package com.code.observer.weather;


import com.code.observer.common.Observe;

/**
 * <p></p>
 *
 * @author hwf
 * @version 1.0
 * @date 2021/12/8 0:44
 */
public class WeatherObserve implements Observe<WeatherSubject> {

    /**
     * 观察者名称
     */
    private String observeName;

    /**
     * 提醒内容
     */
    private String remindThing;

    @Override
    public void update(WeatherSubject subject) {
        /**
         * 天气情况(目标获取)
         */
        String weatherContent = subject.getWeatherContent();
        System.out.println(observeName + "收到了" + weatherContent + "," + remindThing);
    }

    public String getObserveName() {
        return observeName;
    }

    public void setObserveName(String observeName) {
        this.observeName = observeName;
    }

    public String getRemindThing() {
        return remindThing;
    }

    public void setRemindThing(String remindThing) {
        this.remindThing = remindThing;
    }
}
